home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / gawk-3.0 / gawk-3 / gawk-3.0.0 / doc / gawk.toc < prev    next >
Encoding:
Text File  |  1996-01-12  |  12.8 KB  |  234 lines

  1. \unnumbchapentry {Preface}{1}
  2. \unnumbsecentry{History of \code {awk} and \code {gawk}}{1}
  3. \unnumbsecentry{The GNU Project and This Book}{1}
  4. \unnumbsecentry{Acknowledgements}{3}
  5. \chapentry {Introduction}{1}{5}
  6. \secentry {Using This Book}{1}{1}{5}
  7. \unnumbsubsecentry{Dark Corners}{6}
  8. \secentry {Typographical Conventions}{1}{2}{6}
  9. \secentry {Data Files for the Examples}{1}{3}{7}
  10. \chapentry {Getting Started with \code {awk}}{2}{9}
  11. \secentry {A Rose By Any Other Name}{2}{1}{9}
  12. \secentry {How to Run \code {awk} Programs}{2}{2}{10}
  13. \subsecentry {One-shot Throw-away \code {awk} Programs}{2}{2}{1}{10}
  14. \subsecentry {Running \code {awk} without Input Files}{2}{2}{2}{11}
  15. \subsecentry {Running Long Programs}{2}{2}{3}{12}
  16. \subsecentry {Executable \code {awk} Programs}{2}{2}{4}{12}
  17. \subsecentry {Comments in \code {awk} Programs}{2}{2}{5}{13}
  18. \secentry {A Very Simple Example}{2}{3}{14}
  19. \secentry {An Example with Two Rules}{2}{4}{14}
  20. \secentry {A More Complex Example}{2}{5}{15}
  21. \secentry {\code {awk} Statements Versus Lines}{2}{6}{16}
  22. \secentry {Other Features of \code {awk}}{2}{7}{18}
  23. \secentry {When to Use \code {awk}}{2}{8}{18}
  24. \chapentry {Useful One Line Programs}{3}{21}
  25. \chapentry {Regular Expressions}{4}{23}
  26. \secentry {How to Use Regular Expressions}{4}{1}{23}
  27. \secentry {Escape Sequences}{4}{2}{24}
  28. \secentry {Regular Expression Operators}{4}{3}{26}
  29. \secentry {Additional Regexp Operators Only in \code {gawk}}{4}{4}{31}
  30. \secentry {Case-sensitivity in Matching}{4}{5}{33}
  31. \secentry {How Much Text Matches?}{4}{6}{34}
  32. \secentry {Using Dynamic Regexps}{4}{7}{35}
  33. \chapentry {Reading Input Files}{5}{37}
  34. \secentry {How Input is Split into Records}{5}{1}{37}
  35. \secentry {Examining Fields}{5}{2}{40}
  36. \secentry {Non-constant Field Numbers}{5}{3}{41}
  37. \secentry {Changing the Contents of a Field}{5}{4}{42}
  38. \secentry {Specifying How Fields are Separated}{5}{5}{44}
  39. \subsecentry {The Basics of Field Separating}{5}{5}{1}{44}
  40. \subsecentry {Using Regular Expressions to Separate Fields}{5}{5}{2}{45}
  41. \subsecentry {Making Each Character a Separate Field}{5}{5}{3}{46}
  42. \subsecentry {Setting \code {FS} from the Command Line}{5}{5}{4}{47}
  43. \subsecentry {Field Splitting Summary}{5}{5}{5}{48}
  44. \secentry {Reading Fixed-width Data}{5}{6}{49}
  45. \secentry {Multiple-Line Records}{5}{7}{51}
  46. \secentry {Explicit Input with \code {getline}}{5}{8}{53}
  47. \subsecentry {Introduction to \code {getline}}{5}{8}{1}{54}
  48. \subsecentry {Using \code {getline} with No Arguments}{5}{8}{2}{54}
  49. \subsecentry {Using \code {getline} Into a Variable}{5}{8}{3}{55}
  50. \subsecentry {Using \code {getline} from a File}{5}{8}{4}{56}
  51. \subsecentry {Using \code {getline} Into a Variable from a File}{5}{8}{5}{56}
  52. \subsecentry {Using \code {getline} from a Pipe}{5}{8}{6}{57}
  53. \subsecentry {Using \code {getline} Into a Variable from a Pipe}{5}{8}{7}{58}
  54. \subsecentry {Summary of \code {getline} Variants}{5}{8}{8}{58}
  55. \chapentry {Printing Output}{6}{61}
  56. \secentry {The \code {print} Statement}{6}{1}{61}
  57. \secentry {Examples of \code {print} Statements}{6}{2}{62}
  58. \secentry {Output Separators}{6}{3}{63}
  59. \secentry {Controlling Numeric Output with \code {print}}{6}{4}{64}
  60. \secentry {Using \code {printf} Statements for Fancier Printing}{6}{5}{64}
  61. \subsecentry {Introduction to the \code {printf} Statement}{6}{5}{1}{65}
  62. \subsecentry {Format-Control Letters}{6}{5}{2}{65}
  63. \subsecentry {Modifiers for \code {printf} Formats}{6}{5}{3}{66}
  64. \subsecentry {Examples Using \code {printf}}{6}{5}{4}{68}
  65. \secentry {Redirecting Output of \code {print} and \code {printf}}{6}{6}{70}
  66. \secentry {Special File Names in \code {gawk}}{6}{7}{72}
  67. \secentry {Closing Input and Output Files and Pipes}{6}{8}{74}
  68. \chapentry {Expressions}{7}{77}
  69. \secentry {Constant Expressions}{7}{1}{77}
  70. \subsecentry {Numeric and String Constants}{7}{1}{1}{77}
  71. \subsecentry {Regular Expression Constants}{7}{1}{2}{77}
  72. \secentry {Using Regular Expression Constants}{7}{2}{78}
  73. \secentry {Variables}{7}{3}{79}
  74. \subsecentry {Using Variables in a Program}{7}{3}{1}{79}
  75. \subsecentry {Assigning Variables on the Command Line}{7}{3}{2}{80}
  76. \secentry {Conversion of Strings and Numbers}{7}{4}{81}
  77. \secentry {Arithmetic Operators}{7}{5}{82}
  78. \secentry {String Concatenation}{7}{6}{83}
  79. \secentry {Assignment Expressions}{7}{7}{84}
  80. \secentry {Increment and Decrement Operators}{7}{8}{87}
  81. \secentry {True and False in \code {awk}}{7}{9}{88}
  82. \secentry {Variable Typing and Comparison Expressions}{7}{10}{88}
  83. \secentry {Boolean Expressions}{7}{11}{91}
  84. \secentry {Conditional Expressions}{7}{12}{93}
  85. \secentry {Function Calls}{7}{13}{93}
  86. \secentry {Operator Precedence (How Operators Nest)}{7}{14}{94}
  87. \chapentry {Patterns and Actions}{8}{97}
  88. \secentry {Pattern Elements}{8}{1}{97}
  89. \subsecentry {Kinds of Patterns}{8}{1}{1}{97}
  90. \subsecentry {Regular Expressions as Patterns}{8}{1}{2}{97}
  91. \subsecentry {Expressions as Patterns}{8}{1}{3}{98}
  92. \subsecentry {Specifying Record Ranges with Patterns}{8}{1}{4}{99}
  93. \subsecentry {The \code {BEGIN} and \code {END} Special Patterns}{8}{1}{5}{100}
  94. \subsubsecentry {Startup and Cleanup Actions} {8}{1}{5}{1} {100}
  95. \subsubsecentry {Input/Output from \code {BEGIN} and \code {END} Rules} {8}{1}{5}{2} {102}
  96. \subsecentry {The Empty Pattern}{8}{1}{6}{102}
  97. \secentry {Overview of Actions}{8}{2}{102}
  98. \chapentry {Control Statements in Actions}{9}{105}
  99. \secentry {The \code {if}-\code {else} Statement}{9}{1}{105}
  100. \secentry {The \code {while} Statement}{9}{2}{106}
  101. \secentry {The \code {do}-\code {while} Statement}{9}{3}{106}
  102. \secentry {The \code {for} Statement}{9}{4}{107}
  103. \secentry {The \code {break} Statement}{9}{5}{109}
  104. \secentry {The \code {continue} Statement}{9}{6}{110}
  105. \secentry {The \code {next} Statement}{9}{7}{111}
  106. \secentry {The \code {nextfile} Statement}{9}{8}{112}
  107. \secentry {The \code {exit} Statement}{9}{9}{112}
  108. \chapentry {Built-in Variables}{10}{115}
  109. \secentry {Built-in Variables that Control \code {awk}}{10}{1}{115}
  110. \secentry {Built-in Variables that Convey Information}{10}{2}{117}
  111. \secentry {Using \code {ARGC} and \code {ARGV}}{10}{3}{119}
  112. \chapentry {Arrays in \code {awk}}{11}{123}
  113. \secentry {Introduction to Arrays}{11}{1}{123}
  114. \secentry {Referring to an Array Element}{11}{2}{124}
  115. \secentry {Assigning Array Elements}{11}{3}{125}
  116. \secentry {Basic Array Example}{11}{4}{125}
  117. \secentry {Scanning All Elements of an Array}{11}{5}{127}
  118. \secentry {The \code {delete} Statement}{11}{6}{128}
  119. \secentry {Using Numbers to Subscript Arrays}{11}{7}{129}
  120. \secentry {Using Uninitialized Variables as Subscripts}{11}{8}{130}
  121. \secentry {Multi-dimensional Arrays}{11}{9}{130}
  122. \secentry {Scanning Multi-dimensional Arrays}{11}{10}{132}
  123. \chapentry {Built-in Functions}{12}{135}
  124. \secentry {Calling Built-in Functions}{12}{1}{135}
  125. \secentry {Numeric Built-in Functions}{12}{2}{136}
  126. \secentry {Built-in Functions for String Manipulation}{12}{3}{137}
  127. \secentry {Built-in Functions for Input/Output}{12}{4}{145}
  128. \secentry {Functions for Dealing with Time Stamps}{12}{5}{148}
  129. \chapentry {User-defined Functions}{13}{153}
  130. \secentry {Function Definition Syntax}{13}{1}{153}
  131. \secentry {Function Definition Examples}{13}{2}{154}
  132. \secentry {Calling User-defined Functions}{13}{3}{156}
  133. \secentry {The \code {return} Statement}{13}{4}{158}
  134. \chapentry {Running \code {awk}}{14}{161}
  135. \secentry {Command Line Options}{14}{1}{161}
  136. \secentry {Other Command Line Arguments}{14}{2}{165}
  137. \secentry {The \code {AWKPATH} Environment Variable}{14}{3}{166}
  138. \secentry {Obsolete Options and/or Features}{14}{4}{167}
  139. \secentry {Undocumented Options and Features}{14}{5}{167}
  140. \secentry {Known Bugs in \code {gawk}}{14}{6}{167}
  141. \chapentry {A Library of \code {awk} Functions}{15}{169}
  142. \secentry {Simulating \code {gawk}-specific Features}{15}{1}{169}
  143. \secentry {Implementing \code {nextfile} as a Function}{15}{2}{170}
  144. \secentry {Assertions}{15}{3}{172}
  145. \secentry {Translating Between Characters and Numbers}{15}{4}{173}
  146. \secentry {Merging an Array Into a String}{15}{5}{175}
  147. \secentry {Turning Dates Into Timestamps}{15}{6}{176}
  148. \secentry {Managing the Time of Day}{15}{7}{182}
  149. \secentry {Noting Data File Boundaries}{15}{8}{184}
  150. \secentry {Processing Command Line Options}{15}{9}{185}
  151. \secentry {Reading the User Database}{15}{10}{191}
  152. \secentry {Reading the Group Database}{15}{11}{196}
  153. \secentry {Naming Library Function Global Variables}{15}{12}{201}
  154. \chapentry {Practical \code {awk} Programs}{16}{203}
  155. \secentry {Re-inventing Wheels for Fun and Profit}{16}{1}{203}
  156. \subsecentry {Cutting Out Fields and Columns}{16}{1}{1}{203}
  157. \subsecentry {Searching for Regular Expressions in Files}{16}{1}{2}{208}
  158. \subsecentry {Printing Out User Information}{16}{1}{3}{212}
  159. \subsecentry {Splitting a Large File Into Pieces}{16}{1}{4}{215}
  160. \subsecentry {Duplicating Output Into Multiple Files}{16}{1}{5}{217}
  161. \subsecentry {Printing Non-duplicated Lines of Text}{16}{1}{6}{218}
  162. \subsecentry {Counting Things}{16}{1}{7}{223}
  163. \secentry {A Grab Bag of \code {awk} Programs}{16}{2}{225}
  164. \subsecentry {Finding Duplicated Words in a Document}{16}{2}{1}{226}
  165. \subsecentry {An Alarm Clock Program}{16}{2}{2}{226}
  166. \subsecentry {Transliterating Characters}{16}{2}{3}{229}
  167. \subsecentry {Printing Mailing Labels}{16}{2}{4}{231}
  168. \subsecentry {Generating Word Usage Counts}{16}{2}{5}{234}
  169. \subsecentry {Removing Duplicates from Unsorted Text}{16}{2}{6}{236}
  170. \subsecentry {Extracting Programs from Texinfo Source Files}{16}{2}{7}{237}
  171. \subsecentry {A Simple Stream Editor}{16}{2}{8}{240}
  172. \subsecentry {An Easy Way to Use Library Functions}{16}{2}{9}{242}
  173. \chapentry {The Evolution of the \code {awk} Language}{17}{251}
  174. \secentry {Major Changes between V7 and SVR3.1}{17}{1}{251}
  175. \secentry {Changes between SVR3.1 and SVR4}{17}{2}{252}
  176. \secentry {Changes between SVR4 and POSIX \code {awk}}{17}{3}{253}
  177. \secentry {Extensions in the AT&T Bell Laboratories \code {awk}}{17}{4}{253}
  178. \secentry {Extensions in \code {gawk} Not in POSIX \code {awk}}{17}{5}{254}
  179. \chapentry {\code {gawk} Summary}{Appendix{} \char65}{257}
  180. \secentry {Command Line Options Summary}{\char65}{1}{257}
  181. \secentry {Language Summary}{\char65}{2}{259}
  182. \secentry {Variables and Fields}{\char65}{3}{259}
  183. \subsecentry {Fields}{\char65}{3}{1}{260}
  184. \subsecentry {Built-in Variables}{\char65}{3}{2}{260}
  185. \subsecentry {Arrays}{\char65}{3}{3}{262}
  186. \subsecentry {Data Types}{\char65}{3}{4}{262}
  187. \secentry {Patterns}{\char65}{4}{263}
  188. \subsecentry {Pattern Summary}{\char65}{4}{1}{264}
  189. \subsecentry {Regular Expressions}{\char65}{4}{2}{265}
  190. \secentry {Actions}{\char65}{5}{266}
  191. \subsecentry {Operators}{\char65}{5}{1}{267}
  192. \subsecentry {Control Statements}{\char65}{5}{2}{268}
  193. \subsecentry {I/O Statements}{\char65}{5}{3}{268}
  194. \subsecentry {\code {printf} Summary}{\char65}{5}{4}{270}
  195. \subsecentry {Special File Names}{\char65}{5}{5}{271}
  196. \subsecentry {Built-in Functions}{\char65}{5}{6}{272}
  197. \subsecentry {Time Functions}{\char65}{5}{7}{274}
  198. \subsecentry {String Constants}{\char65}{5}{8}{274}
  199. \secentry {User-defined Functions}{\char65}{6}{275}
  200. \secentry {Historical Features}{\char65}{7}{276}
  201. \chapentry {Installing \code {gawk}}{Appendix{} \char66}{277}
  202. \secentry {The \code {gawk} Distribution}{\char66}{1}{277}
  203. \subsecentry {Getting the \code {gawk} Distribution}{\char66}{1}{1}{277}
  204. \subsecentry {Extracting the Distribution}{\char66}{1}{2}{279}
  205. \subsecentry {Contents of the \code {gawk} Distribution}{\char66}{1}{3}{279}
  206. \secentry {Compiling and Installing \code {gawk} on Unix}{\char66}{2}{282}
  207. \subsecentry {Compiling \code {gawk} for Unix}{\char66}{2}{1}{282}
  208. \subsecentry {The Configuration Process}{\char66}{2}{2}{282}
  209. \secentry {How to Compile and Install \code {gawk} on VMS}{\char66}{3}{283}
  210. \subsecentry {Compiling \code {gawk} on VMS}{\char66}{3}{1}{283}
  211. \subsecentry {Installing \code {gawk} on VMS}{\char66}{3}{2}{284}
  212. \subsecentry {Running \code {gawk} on VMS}{\char66}{3}{3}{285}
  213. \subsecentry {Building and Using \code {gawk} on VMS POSIX}{\char66}{3}{4}{285}
  214. \secentry {MS-DOS and OS/2 Installation and Compilation}{\char66}{4}{286}
  215. \secentry {Installing \code {gawk} on the Atari ST}{\char66}{5}{287}
  216. \subsecentry {Compiling \code {gawk} on the Atari ST}{\char66}{5}{1}{287}
  217. \subsecentry {Running \code {gawk} on the Atari ST}{\char66}{5}{2}{288}
  218. \secentry {Installing \code {gawk} on an Amiga}{\char66}{6}{289}
  219. \secentry {Reporting Problems and Bugs}{\char66}{7}{290}
  220. \secentry {Other Freely Available \code {awk} Implementations}{\char66}{8}{291}
  221. \chapentry {Implementation Notes}{Appendix{} \char67}{293}
  222. \secentry {Downward Compatibility and Debugging}{\char67}{1}{293}
  223. \secentry {Making Additions to \code {gawk}}{\char67}{2}{293}
  224. \subsecentry {Adding New Features}{\char67}{2}{1}{293}
  225. \subsecentry {Porting \code {gawk} to a New Operating System}{\char67}{2}{2}{295}
  226. \secentry {Probable Future Extensions}{\char67}{3}{297}
  227. \secentry {Suggestions for Improvements}{\char67}{4}{298}
  228. \chapentry {Glossary}{Appendix{} \char68}{299}
  229. \unnumbchapentry {GNU GENERAL PUBLIC LICENSE}{307}
  230. \unnumbsecentry{Preamble}{307}
  231. \unnumbsecentry{TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION}{308}
  232. \unnumbsecentry{How to Apply These Terms to Your New Programs}{313}
  233. \unnumbchapentry {Index}{315}
  234.